<%@page import="org.apache.commons.lang.StringUtils"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	request.setAttribute("path", path);
	String pk = request.getParameter("pk");
	if(StringUtils.isEmpty(pk)){
		pk = "";
	}
%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="keyword" content="">
    <link rel="shortcut icon" href="img/favicon.png">

    <title>菜单详情</title>

    <!-- Bootstrap core CSS -->
    <link href="${path}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${path}/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="${path}/assets2/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="${path}/css/style.css" rel="stylesheet">
    <link href="${path}/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="${path}/js/html5shiv.js"></script>
      <script src="${path}/js/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
      <!--main content start-->
          <section class="wrapper">
              <!-- page start-->
              <div class="row">
                  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                             	菜单详情
                          </header>
                          <div class="row panel-heading detail">	
							   <div class="col-lg-3 col-md-6">
                                    <span>菜单名：</span>
                                    <span name="name"></span>
                                </div>
							   <div class="col-lg-3 col-md-6">
                                    <span>路径：</span>
                                    <span name="url"></span>
                                </div>
							   <div class="col-lg-3 col-md-6">
                                    <span>备注：</span>
                                    <span name="remark"></span>
                                </div>
							   <div class="col-lg-3 col-md-6">
                                    <span>父菜单：</span>
                                    <span name="parentRes"></span>
                                </div>
                                <div class="col-lg-3 col-md-6">
                                    <span>模块标签：</span>
                                    <span name="moduleFlag"></span>
                                </div>
							   <div class="col-lg-3 col-md-6">
                                    <span>序号：</span>
                                    <span name="sortNo"></span>
                                </div>
							    <div class="col-md-6">
                               		  <button class="btn btn-danger" type="button" onclick="javascript:window.location.href='${path}/jsp/config/cResource_list.jsp'">返回</button>
                          		</div>                          	   
                          </div>
                      </section>
                  </div>
              </div>
              <!-- page end-->
          </section>
      <!--main content end-->
     

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="${path}/js/jquery.js"></script>
    <script src="${path}/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="${path}/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="${path}/js/jquery.scrollTo.min.js"></script>
    <script src="${path}/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="${path}/js/respond.min.js" ></script>

    <!--common script for all pages-->
    <script src="${path}/js/common-scripts.js"></script>
	
	<script type="text/javascript">
	var pk= '<%=pk%>';
		$(function(){
			jQuery.ajax({
				url : "${path}/rest/cResource/getDetailByPk",
				type : "post",
				data : {pk:pk},
				success : function(result) {
					if(result=='undefined'){
						return;
					}
					$("span[name='id']").html(result.id);
					$("span[name='name']").html(result.name);
					$("span[name='url']").html(result.url);
					$("span[name='remark']").html(result.remark);
					$("span[name='moduleFlag']").html(result.moduleFlag);
					$("span[name='parentRes']").html(result.parentRes);
					$("span[name='sortNo']").html(result.sortNo);
					$("span[name='moduleFlag']").html(result.moduleFlag);
				},
				error : function(result) {
				}
			});
			
		});
	</script>

  </body>
</html>
